package protobuf {
	import com.netease.protobuf.*;
	use namespace com.netease.protobuf.used_by_generated_code;
	import com.netease.protobuf.fieldDescriptors.*;
	import flash.utils.Endian;
	import flash.utils.IDataInput;
	import flash.utils.IDataOutput;
	import flash.utils.IExternalizable;
	import flash.errors.IOError;
	// @@protoc_insertion_point(imports)

	// @@protoc_insertion_point(class_metadata)
	public dynamic final class BET_POOL extends com.netease.protobuf.Message {
		/**
		 *  @private
		 */
		public static const CHAIR_LIST:RepeatedFieldDescriptor$TYPE_UINT32 = new RepeatedFieldDescriptor$TYPE_UINT32("protobuf.BET_POOL.chair_list", "chairList", (1 << 3) | com.netease.protobuf.WireType.VARINT);

		[ArrayElementType("uint")]
		public var chairList:Array = [];

		/**
		 *  @private
		 */
		public static const MONEY:FieldDescriptor$TYPE_DOUBLE = new FieldDescriptor$TYPE_DOUBLE("protobuf.BET_POOL.money", "money", (2 << 3) | com.netease.protobuf.WireType.FIXED_64_BIT);

		public var money:Number;

		/**
		 *  @private
		 */
		public static const WIN:FieldDescriptor$TYPE_BOOL = new FieldDescriptor$TYPE_BOOL("protobuf.BET_POOL.win", "win", (3 << 3) | com.netease.protobuf.WireType.VARINT);

		private var win$field:Boolean;

		private var hasField$0:uint = 0;

		public function clearWin():void {
			hasField$0 &= 0xfffffffe;
			win$field = new Boolean();
		}

		public function get hasWin():Boolean {
			return (hasField$0 & 0x1) != 0;
		}

		public function set win(value:Boolean):void {
			hasField$0 |= 0x1;
			win$field = value;
		}

		public function get win():Boolean {
			return win$field;
		}

		/**
		 *  @private
		 */
		override used_by_generated_code final function writeToBuffer(output:com.netease.protobuf.WritingBuffer):void {
			for (var chairList$index:uint = 0; chairList$index < this.chairList.length; ++chairList$index) {
				com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.VARINT, 1);
				com.netease.protobuf.WriteUtils.write$TYPE_UINT32(output, this.chairList[chairList$index]);
			}
			com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.FIXED_64_BIT, 2);
			com.netease.protobuf.WriteUtils.write$TYPE_DOUBLE(output, this.money);
			if (hasWin) {
				com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.VARINT, 3);
				com.netease.protobuf.WriteUtils.write$TYPE_BOOL(output, win$field);
			}
			for (var fieldKey:* in this) {
				super.writeUnknown(output, fieldKey);
			}
		}

		/**
		 *  @private
		 */
		override used_by_generated_code final function readFromSlice(input:flash.utils.IDataInput, bytesAfterSlice:uint):void {
			var money$count:uint = 0;
			var win$count:uint = 0;
			while (input.bytesAvailable > bytesAfterSlice) {
				var tag:uint = com.netease.protobuf.ReadUtils.read$TYPE_UINT32(input);
				switch (tag >> 3) {
				case 1:
					if ((tag & 7) == com.netease.protobuf.WireType.LENGTH_DELIMITED) {
						com.netease.protobuf.ReadUtils.readPackedRepeated(input, com.netease.protobuf.ReadUtils.read$TYPE_UINT32, this.chairList);
						break;
					}
					this.chairList.push(com.netease.protobuf.ReadUtils.read$TYPE_UINT32(input));
					break;
				case 2:
					if (money$count != 0) {
						throw new flash.errors.IOError('Bad data format: BET_POOL.money cannot be set twice.');
					}
					++money$count;
					this.money = com.netease.protobuf.ReadUtils.read$TYPE_DOUBLE(input);
					break;
				case 3:
					if (win$count != 0) {
						throw new flash.errors.IOError('Bad data format: BET_POOL.win cannot be set twice.');
					}
					++win$count;
					this.win = com.netease.protobuf.ReadUtils.read$TYPE_BOOL(input);
					break;
				default:
					super.readUnknown(input, tag);
					break;
				}
			}
		}

	}
}
